<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>fs模块常用Api 总结</title>
    <style>

        table {
            border-collapse: collapse;

            tr td {
                padding: 8px;
                min-width: 120px;
                text-align: center;
            }

            .header-tr {
                td {
                    font-size: 14px;
                    font-weight: 700;
                }
            }

            .td-fontweight {
                font-size: 14px;
                font-weight: 700;
            }
        }

        .definition {
            color:red
        }
    </style>
</head>
<body>

<h3>fs模块常用api</h3>
<table border={'1px'}>
    <tbody>
    <tr class="header-tr">
        <td>API</td>
        <td>文件写入 <span class="definition">(write)</span></td>
        <td>文件读取 <span class="definition">(read)</span></td>
        <td>文件或文件夹的重命名和移动 <span class="definition">(re)</span></td>
        <td>文件删除 <span class="definition">(rm)</span></td>
        <td>文件夹操作 <span class="definition">(dir)</span></td>
    </tr>
    <tr>
        <td class="td-fontweight">异步</td>
        <td>writeFile | appendFile(追加写入)</td>
        <td>readFile</td>
        <td>rename</td>
        <td>unlink | rm（建议使用）</td>
        <td>创建文件夹： mkdir | mkdirSync</td>
    </tr>
    <tr>
        <td class="td-fontweight">同步</td>
        <td>writeFileSync | appendFileSync(追加写入)</td>
        <td>readFileSync</td>
        <td>renameSync</td>
        <td>unlinkSync | rmSync（建议使用）</td>
        <td>文件夹读取： readdir | readdirSync</td>
    </tr>
    <tr>
        <td class="td-fontweight">流式</td>
        <td>createWriteStream</td>
        <td>createReadStream</td>
        <td></td>
        <td></td>
        <td>文件夹删除： rmdir|rmdirSync | rm | rmSync （建议使用rm）</td>
    </tr>
    </tbody>

</table>

</body>
</html>